<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html lang="en">
<head>
    <%@include file="/WEB-INF/pages/common/head.jsp"%>
</head>
<body>
    <div class="container-fluid">
        <div class="panel panel-info">
            <div class="panel-heading">
                <h4>查询条件</h4>
                <a class="caret pull-right" data-toggle="collapse" href="#content"></a>
            </div>
            <div id="content" class="panel-collapse collapse in">
                <div class="panel-body">
                    <form id="condition"  class="form-inline">
                        <div class="row">
                            <div class="panel-group col-md-4">
                                <label for="cgName">物资名称:</label>
                                <input type="text" id="cgName" name="cgName" class="form-control"/>

                            </div>
                            <div class="panel-group col-md-4">
                                <label for="cgCode">物资编码:</label>
                                <input type="text" id="cgCode" name="cgCode" class="form-control"/>
                            </div>
                            <div class="panel-group col-md-4">
                                <label for="inputCode">助记码:</label>
                                <input type="text" id="inputCode" name="inputCode" class="form-control"/>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-10"></div>
                            <div class="col-md-2">
                                <button class="btn btn-primary" type="button" onclick="searchTjDictionary()">查询</button>
                                <button class="btn btn-primary" type="button" onclick="addDictionary()">新增</button>
                            </div>

                        </div>

                    </form>
                </div>
            </div>
        </div>
        <table id="table" data-toggle="table"
               data-pagination="true"
               data-side-pagination="server"
               data-url="base/dictionary/searchByDictionaryPager"
        data-toolbar-algin="right"
               data-align="center"
        >
            <thead>
                <tr>
                    <th data-field="dictionaryId">序号</th>
                    <th data-field="cgCode">物资编码</th>
                    <th data-field="cgName">物资名称</th>
                    <th data-field="spec">最小规格</th>
                    <th data-field="packUnit">包装单位</th>
                    <th data-field="factory" >生产厂家</th>
                    <th data-field="gooallCode" data-formatter="FormatGooall">物资货位</th>
                    <th data-field="price">单价</th>
                    <th data-formatter="FormatOperation">操作</th>
                </tr>
            </thead>
        </table>
    </div>

    <div class="hidden" id="UpDictionary">
        <form id="updateDictionary"  class="form-horizontal">
            <div class="row">

                <div class="form-group col-md-4">
                    <label for="">物资名称:</label>
                    <input type="text"  name="cgName" class="form-control"/>
                    <input type="hidden" name="dictionaryId" class="form-control"/>
                </div>
                <div class="form-group col-md-4">
                    <label for="">助记码:</label>
                    <input type="text"  name="inputCode" class="form-control"/>
                </div>
                <div class="form-group col-md-4">
                    <label for="">物资编码:</label>
                    <input type="text"  name="cgCode" class="form-control"/>
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-4">
                    <label for="">最小规格:</label>
                    <input type="text" class="form-control" name="spec">
                </div>
                <div class="form-group col-md-4">
                    <label for="">最小单位:</label>
                    <input type="text" class="form-control" name="unit">
                </div>
                <div class="form-group col-md-4">
                    <label for="">包装单位:</label>
                    <input type="text" class="form-control" name="packUnit">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-4">
                    <label for="">包装规格:</label>
                    <input type="text" class="form-control" name="packSpec">
                </div>
                <div class="form-group col-md-4">
                    <label for="">物资类别:</label>
                    <select class="form-control"  name="type">
                        <option value="0">低值</option>
                        <option value="1">高值</option>
                    </select>
                </div>
                <div class="form-group col-md-4">
                    <label for="">生产厂家:</label>
                    <input type="text" class="form-control" name="factory">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-4">
                    <label for="">是否禁用:</label>
                    <select class="form-control"  name="deleteFlag">
                        <option value="Y">在用</option>
                        <option value="N">禁用</option>
                    </select>
                </div>
                <div class="form-group col-md-4">
                    <label for="">单价:</label>
                    <input type="text" class="form-control" name="price">
                </div>
                <div class="form-group col-md-4">

                </div>
            </div>
            <div class="row">
                <div class="col-md-8">
                    <label for="">物资货位:</label>
                    <select class="form-control"  name="gooallCode">
                        <c:forEach items="${gooalls}" var="d">
                            <option value="${d.gooallCode}">${d.gooallName}</option>
                        </c:forEach>
                    </select>
                </div>
                <div class="col-md-4">

                </div>
            </div>


        </form>
    </div>

    <div class="hidden" id="AddDictionary">
        <form id="adDictionary"  class="form-horizontal">
            <div class="row">

                <div class="form-group col-md-4">
                    <label for="">物资名称:</label>
                    <input type="text"  name="cgName" class="form-control"/>
                    <input type="hidden" name="dictionaryId" class="form-control"/>
                </div>
                <div class="form-group col-md-4">
                    <label for="">助记码:</label>
                    <input type="text"  name="inputCode" class="form-control"/>
                </div>
                <div class="form-group col-md-4">
                    <label for="">物资编码:</label>
                    <input type="text"  name="cgCode" class="form-control"/>
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-4">
                    <label for="">最小规格:</label>
                    <input type="text" class="form-control" name="spec">
                </div>
                <div class="form-group col-md-4">
                    <label for="">最小单位:</label>
                    <input type="text" class="form-control" name="unit">
                </div>
                <div class="form-group col-md-4">
                    <label for="">包装单位:</label>
                    <input type="text" class="form-control" name="packUnit">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-4">
                    <label for="">包装规格:</label>
                    <input type="text" class="form-control" name="packSpec">
                </div>
                <div class="form-group col-md-4">
                    <label for="">物资类别:</label>
                    <select class="form-control"  name="type">
                        <option value="0">低值</option>
                        <option value="1">高值</option>
                    </select>
                </div>
                <div class="form-group col-md-4">
                    <label for="">生产厂家:</label>
                    <input type="text" class="form-control" name="factory">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-4">
                    <label for="">是否禁用:</label>
                    <select class="form-control"  name="deleteFlag">
                        <option value="N">禁用</option>
                        <option value="Y">在用</option>
                    </select>
                </div>
                <div class="form-group col-md-4">
                    <label for="">单价:</label>
                    <input type="text" class="form-control" name="price">
                </div>
                <div class="form-group col-md-4">

                </div>
            </div>
            <div class="row">
                <div class="col-md-8">
                    <label for="">物资货位:</label>
                    <select class="form-control"  name="gooallCode">
                        <c:forEach items="${gooalls}" var="d">
                            <option value="${d.gooallCode}">${d.gooallName}</option>
                        </c:forEach>
                    </select>
                </div>
                <div class="col-md-4">

                </div>
            </div>


        </form>
    </div>
<%@include file="/WEB-INF/pages/common/modal.jsp"%>
<script src="res/js/dictionary.js"></script>
</body>
</html>